// https : // iai.sh.cn/problem/617
#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, d;
  long long c;
  cin >> n >> c >> d;
  vector<int> x(n + 2, 0), a(n + 2, 0);
  for (int i = 1; i <= n; ++i)
    cin >> x[i] >> a[i];

  x[++n] = d;
  // 大根堆
  priority_queue<int> Q;
  int res = 0;
  for (int i = 1; i <= n; ++i) {
    while (c < x[i] && !Q.empty()) {
      c += Q.top(); // 使用最大补给
      Q.pop();
      ++res; // 记录补给次数
    }
    if (c < x[i]) // 如果物资不足，结束循环
      break;
    Q.push(a[i]); // 加入当前补给机会
  }
  if (c < d)
    cout << "Impossible" << endl;
  else
    cout << res << endl;
  return 0;
}
